public class Main {
    public static void main(String[] args) {
        AllyControlCenter acc = new ConcreteAllyControlCenter("指挥作战中心");
        Observer player1 = new Player();
        player1.setName("张三");
        Observer player2 = new Player();
        player2.setName("李四");
        Observer player3 = new Player();
        player3.setName("王五");
        acc.join(player1);
        acc.join(player2);
        acc.join(player3);
        player2.beAttacked(acc);
    }
}